package Excise6;

public class zuoye1 {
	public static void main(String[] args) {
		Fan f1 = new Fan();
		String str1 = f1.toString();
		System.out.println(str1);
		f1.setColor("red");
		f1.setOn(true);
		f1.setRedius(1.0);
		f1.setSpeed(100);
		String str = f1.toString();
		System.out.println(str);
	}	
}

class Fan {
	int speed;
	double redius;
	String color;
	boolean on;
	public Fan() {
		speed = 50;
		redius = 1.0;
		color = "yellow";
		on = false;
	}
	public int getSpeed() {
		return speed;
	}
	public void setSpeed(int speed) {
		this.speed = speed;
	}
	public double getRedius() {
		return redius;
	}
	public void setRedius(double redius) {
		this.redius = redius;
	}
	public String getColor() {
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}
	public boolean isOn() {
		return on;
	}
	public void setOn(boolean on) {
		this.on = on;
	}
	@Override
	public String toString() {
		return "Fan [speed=" + speed + ", redius=" + redius + ", color=" + color + ", on=" + on + "]";
	}

}
